home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
ENT
/
DISK1644.ZIP
/
GMENU.DOC
< prev
next >
Wrap
Text File
|
1992-02-21
|
18KB
|
349 lines
Program Name: GMENU - Version 1.2O Written by: Garry Spencer
(ShareWare) 5O27 Byron Rd
Memphis, TN 38122
Files Used: GMENU.EXE - Main program
GMENU.DAT - Data file for GMENU.EXE
GMENU.DOC - Documentation (this file)
Installation: From the root directory (C:\), execute the following commands
with the GMENU disk in drive A: .
MD \GMENU
CD \GMENU
COPY A:GMENU.*
SET GMENU=\GMENU\GMENU.DAT
If you have been using my earlier program (GAMES), you can copy
the GAMES.DAT file to GMENU.DAT. The structure is similar.
Be sure that the \GMENU directory is in your PATH statement!
To start, type GMENU. The GMENU.DAT data file can be edited at
the command line (or from within GMENU by typing the E key).
Please read through the GMENU.DAT file before using it, to make
sure that there are no syntax problems.
Desired GMENU Function Required Command
──────────────────────────────────── ──────────────────────────────────────
Move cursor up one line Keyboard: Up-arrow
Joystick: Push stick forward
Mouse : Move mouse forward
Move cursor down one line Keyboard: Down-arrow
Joystick: Pull stick back
Mouse : Move mouse back
Move up one menu page Keyboard: PgUp or Left-arrow
Joystick: Move stick to the left
Mouse : Move mouse forward while
pressing the right-mouse button
Move down one menu page Keyboard: PgDn or Right-arrow
Joystick: Move stick to the right
Mouse : Move mouse back while pressing
the right-mouse button
Make a selection Keyboard: press the Enter key or Spacebar
Joystick: press the FIRE button
Mouse : press the left-mouse button
Edit the current menu file using Keyboard: press the E key
the editor specified in the EDIT=
menu file command (default is ED )
Exit the program with the DOS Keyboard: press the ESC key
command specified in the EXIT=
menu file command (up to 14 (the Alt-X key exits without
characters) executing any DOS commands)
GMENU DATA FILE INFORMATION
1. First of all, this menu system was designed for those who are not intimidated
by the DOS command line prompt. The menu file must be created/edited to
meet the user's needs. This may not be as easy as some menu systems, but an
experienced user can make the GMENU system very flexible.
2. The GMENU.EXE file MUST be located in a directory which is in the current
path. The file GMENU.DAT should be located in a directory which is in the
current PATH (e.g. C:\GMENU) -OR- the environment variable GMENU can
be used to hold the directory and/or filename of the GMENU data file. The
default filename, unless it is changed, is GMENU.DAT.
3. When the GMENU program is executed, the following actions are taken:
The environment area is searched for a variable named GMENU. IF it is
found, its string is searched for a valid directory path AND/OR filename.
This value can be set at the DOS command line by using :
SET GMENU=\path or SET GMENU=\path\filename or SET GMENU=filename .
Be sure that the environment space is large enough for this information.
The size of the environment area can be be changed (at bootup) by including
the SHELL command in the CONFIG.SYS file. Check the DOS manual if necessary.
The default filename of the GMENU data file is GMENU.DAT, but if a
filename is specified in the GMENU variable, the new filename will be
used. The program will attempt to locate the data file in the path
(if one was specified), otherwise it will try the current directory, then
the system PATH (if present). When the file is located, its contents are
read into memory. If the file can not be located, an error message is
printed on the screen.
4. Menu options are entered into memory by placing a # (menu option name tag)
as the first character of a line. The NAME of the menu option is placed
on the same line and immediately after the # (pound·sign). This text will
appear on the screen. Only one line of text may be used for each menu
option. The actions to be taken, when that option is selected, are placed
on the next line(s). Several lines of normal DOS (batch) commands may be
entered. GMENU creates a temporary batch file to execute these commands.
If another batch file is to invoked, the CALL (DOS 3+) command may be used.
To conserve file space, the (^ up·carat) may be entered in place of a
cr·lf (carriage·return-line·feed) combination. For example,
method 1
#UNO Card Game
CD\GAMES
UNO
#NEXT-GAME etc.
method 2
#UNO Card Game
CD\GAMES^UNO
#NEXT-GAME etc.
Please note that command line arguments (%1 %2 etc.) can not be included
in the execution of the temporary batch file. Any command with fixed
command line arguments may be placed inside the temporary batch file.
In addition to normal DOS batch file commands, the GMENU program looks
for special GMENU system commands such as:
COLOR= EDIT= EXIT= GOTO= INPUT= SCREENSAVE= TAB= TITLE=
All of these commands are optional. If any of these commands are not found,
the default values are used. The EDIT=, EXIT=, INPUT= and SCREENSAVE=
commands MUST be located BEFORE the first menu option name tag (a # in the
first character of a line). The COLOR=, GOTO= and TITLE= may be put anywhere
in the file, but the COLOR= takes effect on the next menu page.
The following list shows the syntax of the GMENU data file system commands:
COLOR=SCREEN(fb) TITLE(fb) POINTER(fb) NAME(fb)
This command specifies the default foreground (f) and background (b)
colors for the next page of menu options. This command is optional.
If the COLOR= command is omitted, or if any of the 4 argument fields
are omitted, then the system uses certain default colors or the last
value assigned to the argument field. The SCREEN(fb) field is used
to set the colors for the entire screen. The foreground color is
not used in this version, but should be included to conform to the
syntax. The TITLE(fb) field sets the colors for the title (top-line)
of the menu screen. The POINTER(fb) sets the colors for the small
arrow pointer on the left side of the screen, which is used to make
a menu selection. The NAME(fb) field sets the colors for the name
of each menu option on the screen. The 4 argument fields are optional
and may appear in any order after the COLOR= command. Any error in
the values (such as a background color other than O through 7) will
cause GMENU to use previously defined values for the (fb) variables.
The (fb) foreground·background values are as follows:
Foreground colors (f)
low-intensity bright low+blink bright+blink base-color
───────────── ────── ───────── ──────────── ─────────────────
┌── O 8 - * black/dark-gray
│ 1 9 ! ( blue
│ 2 A @ a green
┌───┤ 3 B # b cyan(blue-green)
│ │ 4 C $ c red
│ │ 5 D % d magenta(purple)
│ │ 6 E ^ e brown/yellow
│ └── 7 F & f gray/white
│
└─ Background colors (b) are the same as the low-intensity foreground
values (O through 7).
For example, COLOR=SCREEN(OO) TITLE(E4) POINTER(FO) NAME(AO)
would cause the screen foreground and background to be black (normal).
The title (top·line) would appear as yellow on a red background.
The pointer would be white on a black background. The name of each
menu option on the page would be green on a black background.
Experimenting with these values can yield some unusual effects.
There is a way to (temporarily) change the name color by specifying
the foreground and background colors (between commas starting in
column 2) on the option-name-tag line. The background defaults to
the current name-background-color if not specified. The change is
in effect for that line only and reverts back to the previous values
on subsequent lines(name-tags).
For example: #,fb,Option Name or #,f,Option Name
#,30,UNO Card Game or #,3,UNO Card Game
EDIT= This command allows the user to specify a default editor which can
then be used to edit the current GMENU data file. Note that if
this command is not used, the default is ED . The GMENU data file(s)
MUST first be created at the DOS command line level. After the file
has been created and loaded in GMENU as the current data file, it
can be edited from within GMENU. For example, EDIT=TED would be used
to invoke Tiny-EDitor.
EXIT= This command allows the user to execute a DOS command whenever the
GMENU program is exited (by pressing the ESC key). At this time,
the limit is 14 characters (after EXIT= and excluding the ENTER
keystroke). For example, EXIT=CD\^DIR would cause the default
directory to be changed to the root directory and then the DIR
command would be executed.
INPUT= This command selects a default input device to override the device
selected by GMENU. The GMENU program checks first for a mouse and
then a joystick. If neither are found, the keyboard is used. The
syntax is:
INPUT=KEYBOARD
INPUT=JOYSTICK
INPUT=MOUSE <══ 2OO dpi mouse (system default if attached)
INPUT=MOUSE1OO 1OO dpi
INPUT=MOUSE4OO 4OO dpi
INPUT=MOUSE8OO 8OO dpi
GOTO= Please see the section on sub-menus for more information on GOTO=.
SCREENSAVE= This command is used to prevent screen phosphor burn-out
caused by leaving a menu on the screen for an extended period
of time. The value used with this function is in MINUTES.
For example, SCREENSAVE=5 will begin the screen·saver function
five minutes after the last keyboard activity (while in the
menu mode). This does not apply to programs executed by GMENU.
The minimum, default and maximum values are as follows:
SCREENSAVE=.25 (.25 minutes = 15 seconds)
SCREENSAVE=1 (default is 1 minute)
SCREENSAVE=1O (maximum value allowed)
If a number outside of this range is specified, the value used
is the limit closest to the specified value. An error in the
value specified will cause the default (1 minute) to be used.
Once the screen·saver is invoked, any keypress will return to
the current menu.
TAB= This command sets the tab position for the TITLE and option-NAME-tags.
The following (optional) fields are available:
TAB=TITLE(mm) NAME(nn) where mm is 1 to 75 and nn=2 to 75.
The default values are TITLE(1) and NAME(3). The TAB command takes
effect when the next TITLE page is generated.
TITLE= This command is used to start a new menu page. The colors used on
the new menu page may be set before or after the TITLE= command, as
long as the colors are set before the next # (option name tag). The
length of the title itself can be up to 8O characters in length.
Each menu page can hold up to 23 options. If more than 23 options
follow a TITLE= statement, a new menu page is generated with the same
title as the last TITLE= statement. The system can handle up to 1OO
menu pages. Note that it may be necessary to pad the title with
leading or trailing spaces in order to center the title.
Additional Notes:
1. RUNNING GMENU FROM INSIDE A BATCH FILE (GMENU @)
Sometimes you might want to use the GMENU program for one particular type
of application (e.g. games). You might be using another menu system to
handle the other types of applications on your system, but want to be able
to call GMENU from the other menu program. This can be done as follows:
Create a batch file (e.g. GM.BAT) which contains the command (GMENU @ ) as
the last command in the file. The @ (at-sign) signals the GMENU program
to exit from the batch file and to run itself from the DOS command line.
This batch file (GM) could then be invoked from the other menu system. The
EXIT= command could be used to send the user back to the other menu system,
(e.g. EXIT=MENU). Do not use the name GMNU.BAT or GMENU.BAT because these
filenames are used by GMENU.EXE. The command (GMENU @) could be placed as
the last line of the AUTOEXEC.BAT file to run the GMENU program whenever
the system is re-booted.
2. ON-LINE HELP
The GMENU system does not have on-line help built into the system, but you
can include a menu option to do this. For example,
#ON-LINE HELP
MORE < \GMENU\GMENU.DOC -or- any LIST/browse program
#Next-option etc.
3. SUB-MENUS (Method 1 using the GOTO= command)
The GOTO= command may be used to change the current menu page (in the
current menu file). The syntax is: GOTO=title where title is the title of
another menu page. This command is not case-sensitive which means that it
will match upper or lower case characters. Leading or trailing spaces on the
title are ignored. Note that the GOTO= must be the only command on the line
after the option-name-tag (#).
For example, the following will cause a "sub-menu" page (Bonus Games) to be
shown when the user selects the (Some Games to Play) option.
#Some Games to Play
GOTO=Bonus Games
#Next Option etc.
dir
TITLE= Bonus Games
#UNO Card Game
CD\GAMES^UNO
#etc.....
Note that the menu pages can still be accessed sequentially.
SUB-MENUS (Method 2 using separate menu files)
The GMENU system was basically set up as a flat-file menuing system. This
means that the pages of menu options are accessed sequentially (like turning
the pages in a book). You can access a sub-menu file by changing the file
and/or path specification in the GMENU environment variable. For example,
#ARCADE GAMES
SET GMENU=\GMENU\ARCDGAME.DAT
DEL GMNU.TMP
#BOARD GAMES
SET GMENU=\GMENU\BRDGAMES.DAT
DEL GMNU.TMP
#CARD GAMES
SET GMENU=\GMENU\CRDGAMES.DAT
DEL GMNU.TMP
#Next-option etc.
The GMENU program will cause the SET command to be executed as a menu
option and then will reload itself with the new menu data file. The files
specified in the example above must be created from the DOS command line.
They can then be edited from within the GMENU program by typing the E
command (if the EDIT= command specifies the correct editor for your system).
Note that menu titles, colors, screen·save times etc. must be specified in
each GMENU data file that you create. These files should have commands for
implementing a return to the main GMENU.DAT file.
For example, to go back to the main menu:
#RETURN TO MAIN-MENU
SET GMENU=\GMENU\GMENU.DAT
DEL GMNU.TMP
#Next-option etc.
Note: The command, DEL GMNU.TMP , which appears after each SET GMENU=
statement discards the temporary file used by the GMENU program
to keep track of the page/option which was executed last. If the
temporary file is not found, GMENU will default to page 1 and
option 1. This is done in order to cause GMENU to select the
first page/option of the new menu file.
4. Special Note:
The temporary batch file (GMNU.BAT) has 3 exit points.
(a) If the user simply allows the batch commands to exit normally, the
default directory will be changed back to the directory from which
GMENU was invoked. The GMENU program will then be restarted.
(b) If the user puts a GOTO EXITGM1 in the batch commands, the default
directory will be changed back to the directory from which GMENU was
invoked, but GMENU will not be restarted.
(c) If the user puts a GOTO EXITGM2 in the batch commands, the batch file
will exit into the current default directory and GMENU will not be
restarted.
5. I hope that you will find the GMENU system to be useful and reasonably
versatile.